<%- include ("../public/page_header.html")%>
<div class="panel panel-default">
    <div class="table-responsive">
        <table class="table table-bordered">
            <thead>
                <tr class="th">
                    <th>导航名称</th>
                    <th>跳转地址</th>
                    <th>导航位置</th>
                    <th>新窗口打开</th>
                    <th class="text-center">排序</th>
                    <th class="text-center">状态</th>
                    <th class="text-center">操作</th>
                </tr>
            </thead>
            <tbody>

                <% for(var i=0;i<list.length;i++){ %>
                <tr>
                    <td><%=list[i].title%></td>
                    <td><%=list[i].link%></td>
                    <td>

                        <%if(list[i].position==1){%>
                        顶部
                        <%}else if(list[i].position==2){%>
                        中间
                        <%}else if(list[i].position==3){%>
                        底部
                        <%}else{%>

                        <%}%>
                        
                        </td>
                        <td> 
                            <%if(list[i].is_opennew==1){%>
                        本窗口
                        <%}else if(list[i].is_opennew==2){%>
                        新窗口
                        <%}else{%>
                        <%}%>
                                          
                        
                        </td>
                    <td>
                        <span class="chSpanNum" data-id="<%=list[i]._id%>" data-model="Nav" data-field="sort"><%=list[i].sort%></span>
                    </td>
                    <td class="text-center">
                         <%if(list[i].status==1){%>
                            <img src="/admin/images/yes.gif" class="chStatus" data-id="<%=list[i]._id%>" data-model="Nav" data-field="status" />
    
                            <%}else{%>
                            <img src="/admin/images/no.gif" class="chStatus" data-id="<%=list[i]._id%>" data-model="Nav" data-field="status" />
                            <%}%>                  
                    </td>                                    
                    <td class="text-center"><a href="/<%=adminPath%>/nav/edit?id=<%=list[i]._id%>">修改</a>　　<a class="delete"
                            href="/<%=adminPath%>/nav/delete?id=<%=list[i]._id%>">删除</a></td>
                </tr>
                <%}%>
              
              

            </tbody>
        </table>
    </div>

</div>